import { Injectable } from '@angular/core';
import { HttpClient } from '../../../../../providers/httpClient';


@Injectable()
export class InfoCollectService {
	constructor(
		public httpClient:HttpClient
	) { }
	// 获取登录人orgid
	getOrgid(logonname){
        let postBody = {
            "module": "KSB",
            "method": "IRM_A02_0010",
            "type":"IRM",
            "format":"json",
            "params": {
                "logonname": logonname
            }
        }
        return this.httpClient.post(postBody);
	}
	// 获取评论内容
	getIrmReportComment(objid){
		let postBody: any = {
			module: "KSB",
			method: "IRM_A02_0260",
			format: "json",
			type: "IRM",
			params: {
				"objid" :"6116631"
			}
		};
		return this.httpClient.post(postBody, { 
			isShowLoading: false
		});
	}
	// 发送评论
	sendIrmReportComment(orgid,reportid,content){
		let postBody: any = {
			module: "KSB",
			method: "IRM_A02_0470",
			format: "json",
			type: "IRM",
			params: {
				"objid" :orgid,
				"orgid" :orgid,
				"reportid" :"6116631",
				"content" :content
			}
		}
		return this.httpClient.post(postBody, {
			isShowLoading: false
		});
	}
}